<div id="page-wrapper">
    <div class="row headline" >
        <div class="col-md-12 headline-title" >
            <h3>后台模块 <img src="assets/img/angle-right.png" alt="" class="tubiao"></h3><h4>员工设置</h4>
        </div>
    </div>
    <div class="row daily-search">
        <div class="col-md-1" >
            <button class="search-content" style="background: #4da1ff;color: #fff;	box-shadow: #84bdff 0px 0px 8px;"  data-toggle="modal" data-target="#studentadd">添加信息</button>
        </div>
    </div>
    <script language="javascript">
        $(function(){
            $(".menu span").click(function(){
                $(".selb").html($(this).html());
                $(".selb").attr("data",$(this).attr("data"))
            });
            $(".selb").click(function(){
                if($(".menu").css("display")=="none"){
                    $(".menu").show();
                }else{
                    $(".menu").hide();
                }
            });
            $(".trangle").click(function(){
                if($(".menu").css("display")=="none"){
                    $(".menu").show();
                }else{
                    $(".menu").hide();
                }
            });
            $(".menu-state span").click(function(){
                $(".selb-state").html($(this).html());
            });
            $(".selb-state").click(function(){
                if($(".menu-state").css("display")=="none"){
                    $(".menu-state").show();
                }else{
                    $(".menu-state").hide();
                }
            });
            $(".trangle-state").click(function(){
                if($(".menu-state").css("display")=="none"){
                    $(".menu-state").show();
                }else{
                    $(".menu-state").hide();
                }
            });
        });
    </script>
    <!--添加信息-->
    <div class="container-fluid text-center">
        <!-- 模态框（Modal） -->
        <div class="modal fade" id="studentadd" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
            <div class="modal-dialog" style="width: 1000px;">
                <div class="modal-content" >
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h2 class="modal-title" ><span class="fa fa-edit">添加信息</span></h2>
                    </div>
                    <form  id="formyanzheng" name="formyanzheng">
                        <div class="modal-body">
                            <!-- 提交表单到服务器 -->
                            <table width="100%" align="center">
                                <tbody class="modal-information">
                                <tr>
                                    <td  height="52"><span style="color: red">*</span>登录账号：</td>
                                    <td>
                                        <input type="text" id="loginname" class="form-control" style="background: #edf5ff;border: 1px solid #f2faff"  ng-model="loginname" name="loginname" required value="">
                                    </td>
                                    <td><span style="color: red">*</span>员工姓名：</td>
                                    <td>
                                        <input type="text" id="username"  class="form-control" style="background:#fffae7;border: 1px solid #FDF3CC;" ng-model="username" value="">
                                    </td>
                                    <td ><span style="color: red">*</span>生日：</td>
                                    <td>
                                        <modeltimetwo></modeltimetwo>
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52">登录密码：</td>
                                    <td>
                                        <input type="text" id="password" class="form-control" style="background: #edf5ff;border: 1px solid #f2faff"  value="123456">
                                    </td>
                                    <td>校区：</td>
                                    <td style="text-align: left" >
                                        <schoolcampus></schoolcampus>
                                    </td>
                                    <td>所教科目：</td>
                                    <td style="text-align: left" >
                                        <subjectstaught></subjectstaught>
                                    </td>
                                </tr>
                                <tr>
                                    <td><span style="color: red">*</span>性别：</td>
                                    <td style="text-align: left" >
                                        <select class="tankuang-staff" id="savesex">
                                            <option value="1" disabled selected style="display: none;">性别</option>
                                            <option value="1">男</option>
                                            <option value="0">女</option>
                                        </select>
                                    </td>
                                    <td><span style="color: red">*</span>工作类型：</td>
                                    <td style="text-align: left" >
                                        <div class="dropdown">
                                            <button class="dropdown-toggle" type="button" id="staffName">请选择职务</button>
                                            <div id="staffIdName" style="font-size:0px;"></div>
                                            <div class="dropdown-menu" id="staff-menu">
                                                <div class="scroll">
                                                    <moreroles></moreroles>
                                                </div>
                                                <p class="okcheck">
                                                    <a class="a1" href="javascript:;">确定<span class="count">(共选择&nbsp;<i id="count">0</i>&nbsp;项)</span></a>
                                                    <a class="a2" href="javascript:;">取消</a>
                                                </p>
                                            </div>
                                        </div>
                                    </td>
                                    <td >是否上班课：</td>
                                    <td style="padding-top:0px;text-align: left">
                                        <input name="Fruit" type="checkbox" value="1"  style="width: 50px;">
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52">银行卡号：</td>
                                    <td>
                                        <input type="text" id="card_bank" class="form-control" style="background: #eae7ff;border: 1px solid #e7e8ff"  ng-model="card_bank" value="" name="account"  size="25">
                                    </td>
                                    <td >身份证号：</td>
                                    <td>
                                        <input type="text" id="card_identification" class="form-control" style="background: #eae7ff;border: 1px solid #e7e8ff"   ng-model="card_identification" value="">
                                    </td>
                                    <td  height="52"><span style="color: red">*</span>手机号：</td>
                                    <td>
                                        <input type="text" id="mobile" class="form-control" style="background: #eae7ff;border: 1px solid #eae7ff"ng-model="mobile" value="">
                                    </td>

                                </tr>
                                <tr>
                                    <td  height="52">微信号：</td>
                                    <td>
                                        <input type="text" id="wechat" class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee" ng-model="wechat" value="">
                                    </td>
                                    <td>QQ号：</td>
                                    <td>
                                        <input type="text"  id="qq" class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee" ng-model="qq" value="">
                                    </td>
                                    <td >邮箱：</td>
                                    <td >
                                        <input type="email" id="email" class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" ng-model="email" value="">
                                    </td>
                                </tr>
                                <tr>
                                    <td >员工状态：</td>
                                    <td style="text-align: left" >
                                        <input type="text" class="form-control" style="background: #edf5ff;border: 1px solid #f2faff"  value="在职">
                                    </td>
                                    <td  height="52"><span style="color: red">*</span>入职日期：</td>
                                    <td>
                                        <stafftime></stafftime>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-primary-tf" id="save" >保存</button>
                        </div>
                    </form>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal -->
        </div>
    </div>
    <div>
        <table class="table ">
            <thead class="yuangong">
            <tr>
                <th>登陆账号</th>
                <th>员工姓名</th>
                <th>所属校区</th>
                <th>工作类型</th>
                <th>手机号</th>
                <th>工作状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody class="xuhao">
            <tr ng-repeat="data in datas " >
                <td>{{data.loginname}}</td>
                <td>{{data.username}}</td>
                <td>{{data.campus_name}}</td>
                <td>{{data.roles_name}}</td>
                <td>{{data.mobile}}</td>
                <td>
                    <span ng-if="data.state==1">在职</span>
                    <span ng-if="data.state==0">离职</span>
                </td>
                <td>
                    <span class="operation fa fa-edit"  ng-click="updata($index)">修改</span>
                    <span class="operation fa fa-trash-o" ng-click="delete($index)">删除</span>
                    <span class="operation fa fa-file-text"  ng-click="ToView($index)">查看</span>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <div class="container-fluid text-center">
        <div class="modal fade" id="staffmodify" tabindex="-1"  aria-labelledby="myModalLabel" >
            <div class="modal-dialog" style="width: 1000px;">
                <div class="modal-content" >
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h2 class="modal-title" ><span class="fa fa-edit">修改信息</span></h2>
                    </div>
                    <form >
                        <div class="modal-body">
                            <div style="position: absolute;width: 90%;height: 30px;background: #fff;z-index: 2222;"></div>
                            <table width="100%" align="center">
                                <tbody class="modal-information">
                                <tr>
                                    <td  height="52"><span style="color: red">*</span>登录账号：</td>
                                    <td>
                                        <input type="text"  class="form-control" style="background: #edf5ff;border: 1px solid #f2faff"  id="updataloginname"   value="{{prod.loginname}}" required >
                                    </td>
                                    <td><span style="color: red">*</span>员工姓名：</td>
                                    <td>
                                        <input type="text"   class="form-control" style="background:#fffae7;border: 1px solid #FDF3CC;" id="updatausername" value="{{prod.username}}">
                                    </td>

                                    <td ><span style="color: red">*</span>生日：</td>
                                    <td>
                                        <input type="text"  class="form-control" style="background:#fffae7;border: 1px solid #FDF3CC;" id="updatabirthday" value="{{prod.birthday}}">
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52">登录密码：</td>
                                    <td>
                                        <input type="text"  class="form-control" style="background: #edf5ff;border: 1px solid #f2faff"  value="123456">
                                    </td>
                                    <td>校区：</td>
                                    <td style="text-align: left" >
                                        <belongeschool></belongeschool>
                                    </td>
                                    <td>所教科目：</td>
                                    <td style="text-align: left" >
                                        <subjectname></subjectname>
                                    </td>
                                </tr>
                                <tr>
                                    <td><span style="color: red">*</span>性别：</td>
                                    <td style="text-align: left" >
                                        <select class="tankuang-staff" id="updatasex">
                                            <option  disabled selected style="display: none;">性别</option>
                                            <option value="1">男</option>
                                            <option value="0">女</option>
                                        </select>
                                    </td>
                                    <td><span style="color: red">*</span>工作类型：</td>
                                    <td style="text-align: left" >
                                        <div class="dropdown">
                                            <button class="dropdown-toggle" type="button" id="updatarole">{{prod.roles_name}}</button>
                                            <div  style="font-size:0px;" id="updataId" class="dropdown-text">{{prod.roles_id}}</div>
                                            <div class="dropdown-menu" id="updata-menu">
                                                <div class="scroll">
                                                    <updataroles></updataroles>
                                                </div>
                                                <p class="okcheck">
                                                    <a class="a1" href="javascript:;">确定<span class="count" id="updatacount">(共选择&nbsp;<i >0</i>&nbsp;项)</span></a>
                                                    <a class="a2" href="javascript:;">取消</a>
                                                </p>
                                            </div>
                                        </div>
                                    </td>
                                    <td >是否上班课：</td>
                                    <td style="padding-top:0px;text-align: left">
                                        <input name="updataclass" type="checkbox"  style="width: 50px;">
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52">银行卡号：</td>
                                    <td>
                                        <input type="text"  class="form-control" style="background: #eae7ff;border: 1px solid #e7e8ff"  id="updatacard_bank" value="{{prod.card_bank}}" >
                                    </td>
                                    <td >身份证号：</td>a
                                    <td>
                                        <input type="text" class="form-control" style="background: #eae7ff;border: 1px solid #e7e8ff"   id="updatacard_identification" value="{{prod.card_identification}}" >
                                    </td>
                                    <td  height="52"><span style="color: red">*</span>手机号：</td>
                                    <td>
                                        <input type="text"  class="form-control" style="background: #eae7ff;border: 1px solid #eae7ff" id="updatamobile" value="{{prod.mobile}}" >
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52">微信号：</td>
                                    <td>
                                        <input type="text" class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee" id="updatawechat" value="{{prod.wechat}}">
                                    </td>
                                    <td>QQ号：</td>
                                    <td>
                                        <input type="text"   class="form-control"  style="background: #fef6f9;border: 1px solid #fce5ee" id="updataqq" value="{{prod.qq}}">
                                    </td>
                                    <td >邮箱：</td>
                                    <td >
                                        <input type="email"  class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" id="updataemail" value="{{prod.email}}">
                                    </td>
                                </tr>
                                <tr>
                                    <td >员工状态：</td>
                                    <td style="text-align: left" >
                                        <select class="tankuang-staff" id="updatastate">
                                            <option value="1">在职</option>
                                            <option value="0">离职</option>
                                        </select>
                                    </td>
                                    <td  height="52"><span style="color: red">*</span>入职日期：</td>
                                    <td>
                                        <input type="text"  class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee"  value="{{prod.date_entry}}" readonly>
                                    </td>
                                    <td  height="52">离职日期：</td>
                                    <td>
                                        <input type="text"  class="form-control" style="background: #fef6f9;border: 1px solid #fce5ee" value="" id="out_entry" placeholder="格式提示：2000-01-01">
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="modal-footer">
                            <button type="submit" class="btn btn-primary-tf" ng-click="save()">保存</button>
                        </div>
                    </form>
                </div>

            </div>
        </div>
    </div>
    <div class="container-fluid text-center">
        <div class="modal fade" id="staffcheck" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
            <div class="modal-dialog" style="width: 1000px;">
                <div class="modal-content" >
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h2 class="modal-title" ><span class="fa fa-edit">查看信息</span></h2>
                    </div>
                    <form>
                        <div class="modal-body">
                            <div style="position: absolute;width: 90%;height: 30px;background: #fff;z-index: 2222;"></div>
                            <table width="100%" align="center">
                                <tbody class="modal-information">
                                <tr>
                                    <td  height="52">登录账号：</td>
                                    <td>
                                        <div  class="list" style="background: #edf5ff;border: 1px solid #f2faff" >{{findContent.loginname}}</div>
                                    </td>
                                    <td>员工姓名：</td>
                                    <td>
                                        <div  class="list" style="background:#fffae7;border: 1px solid #FDF3CC;" >{{findContent.username}}</div>
                                    </td>
                                    <td >生日：</td>
                                    <td>
                                        <div class="list" style="background:#fffae7;border: 1px solid #FDF3CC;" >{{findContent.birthday}}</div>
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52">登录密码：</td>
                                    <td>
                                        <div class="list" style="background: #edf5ff;border: 1px solid #f2faff"  >&nbsp</div>
                                    </td>
                                    <td>校区：</td>
                                    <td style="text-align: left" >
                                        <div  class="list" style="background: #edf5ff;border: 1px solid #f2faff;text-align: center">{{findContent.campus_name}}</div>
                                    </td>
                                    <td>所教科目：</td>
                                    <td style="text-align: left" >
                                        <div class="list" style="background: #edf5ff;border: 1px solid #f2faff;text-align: center">{{findContent.subject_name}}</div>
                                    </td>
                                </tr>
                                <tr>f
                                    <td>性别：</td>
                                    <td style="text-align: left" >
                                        <div class="list" style="background:#fffae7;border: 1px solid #FDF3CC;text-align: center" ng-if="findContent.sex==1">男</div>
                                        <div class="list" style="background:#fffae7;border: 1px solid #FDF3CC;text-align: center" ng-if="findContent.sex==0">女</div>
                                    </td>
                                    <td>工作类型：</td>
                                    <td style="text-align: left" >
                                        <div class="list" style="background:#fffae7;border: 1px solid #FDF3CC;text-align: center">{{findContent.roles_name}}</div>
                                    </td>
                                    <td >是否上班课：</td>
                                    <td style="padding-top:0px; text-align: left">
                                        <div class="list" style="background:#fffae7;border: 1px solid #FDF3CC;text-align: center" ng-if="findContent.is_class==0">是</div>
                                        <div class="list" style="background:#fffae7;border: 1px solid #FDF3CC;text-align: center" ng-if="findContent.is_class==1">否</div>
                                    </td>

                                </tr>
                                <tr>
                                    <td  height="52">银行卡号：</td>
                                    <td>
                                        <div  class="list" style="background: #eae7ff;border: 1px solid #e7e8ff">{{findContent.card_bank}}</div>
                                    </td>
                                    <td >身份证号：</td>
                                    <td>
                                        <div  class=" list" style="background: #eae7ff;border: 1px solid #e7e8ff">{{findContent.card_identification}}</div>
                                    </td>
                                    <td  height="52">手机号：</td>
                                    <td>
                                        <div class="list" style="background: #eae7ff;border: 1px solid #eae7ff">{{findContent.mobile}}</div>
                                    </td>
                                </tr>
                                <tr>
                                    <td  height="52">微信号：</td>
                                    <td>
                                        <div class="list"  style="background: #fef6f9;border: 1px solid #fce5ee">{{findContent.wechat}}</div>
                                    </td>
                                    <td>QQ号：</td>
                                    <td>
                                        <div class="list"  style="background: #fef6f9;border: 1px solid #fce5ee">{{findContent.qq}}</div>
                                    </td>
                                    <td >邮箱：</td>
                                    <td >
                                        <div  class="list" style="background: #fef6f9;border: 1px solid #fce5ee">{{findContent.email}}</div>
                                    </td>
                                </tr>
                                <tr>
                                    <td >员工状态：</td>
                                    <td style="text-align: left" >
                                        <div class="list" style="background: #edf5ff;border: 1px solid #f2faff;text-align: center" ng-if="findContent.state==1">在职</div>
                                        <div class="list" style="background: #edf5ff;border: 1px solid #f2faff;text-align: center" ng-if="findContent.state==0">离职</div>
                                    </td>
                                    <td  height="52">入职日期：</td>
                                    <td>
                                        <div class="list" style="background: #edf5ff;border: 1px solid #f2faff;text-align: center">{{findContent.date_entry}}</div>
                                    </td>
                                    <td  height="52">离职日期：</td>
                                    <td>
                                        <div class="list" style="background: #edf5ff;border: 1px solid #f2faff;text-align: center">{{findContent.date_departure}}</div>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
<!--翻页-->
    <div ng-if="myPage.totalItems" my-pagination pg="myPage"></div>
</div>
